﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IService
{
    public interface IFriendService
    {
        /// <summary>
        /// 是否是好友
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="to">对方的用户Id</param>
        /// <returns></returns>
        bool IsFriend(int selfId, int to);

        /// <summary>
        /// 添加好友
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="to">对方的用户Id</param>
        /// <returns></returns>
        bool AddFriend(int selfId, int to);

        /// <summary>
        /// 获取好友信息
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="to">对方的用户Id</param>
        /// <returns></returns>
        Friend GetFriend(int selfId, int to);

        /// <summary>
        /// 获取消息记录
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="to">对方的用户Id</param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Message> GetMessages(int selfId, int to, int pageNumber, int pageSize = 10);

        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <param name="content">消息内容</param>
        /// <returns></returns>
       bool SendMessage(int selfId, int otherId, string content);

        /// <summary>
        /// 获取好友列表
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <returns></returns>
        Dictionary<int, Friend> GetFriends(int selfId);
    }
}
